package com.loser.room.rpc;

import com.loser.module.base.common.ApiResponse;
import com.loser.rpc.search.dto.req.OptLogReq;
import com.loser.rpc.search.dto.resp.OptLogResp;
import com.loser.rpc.search.rpc.SearchFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class RpcSearchHandler {

    @Autowired
    private SearchFeign searchFeign;

    public ApiResponse<Boolean> save(OptLogReq req) {
        return searchFeign.save(req);
    }

    public ApiResponse<List<OptLogResp>> getList(Long userId) {
        return searchFeign.getList(userId);
    }

}
